package di.scanner.processor;

import di.scanner.executor.ThreadPool;

public class JavaPaserProcessor implements Processor {

    private Class clazz;
    public JavaPaserProcessor(Class clazz) {
        this.clazz = clazz;
    }

    @Override
    public void process() {
        for (int len = 0;len<5;len++){
            try {
                ThreadPool.getInstance().getThreadPool(ThreadPool.FILE_CONSUMER_POOL).execute((Runnable) clazz.newInstance());
            } catch (InstantiationException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
    }


}
